import Vue from 'vue'
import VueRouter from 'vue-router'
import main from '../components/main.vue'
import student from '../views/student.vue'
import wyclass from '../views/class.vue'
import major from '../views/major.vue'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:"home",
    component:main
  },
  {
    path: '/student',
    name: 'stu',
    component:student
  },
  {
    path: '/class',
    component: wyclass
  },
  {
    path: '/major',
    component:major
  },
  {
    path: "/test",
    component: ()=> import("../views/major/add.vue")
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
